//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "Graphics/MetaData/Meta.RenderState.h"
#include "Graphics/MetaData/Meta.Sampler.h"

#ifdef ENGINE_META_DATA
#	include "Graphics/Resources/Program.h"
#endif


	//
	// Program Texture
	//
#	define META_OBJECT			ProgramTextureCfg
#	define META_OBJECT_NAME		TOSTRING( ProgramTexture )
#	define META_NAME			MetaProgramTexture

#	define META_FIELDS( _decl ) \
		_decl( SamplerCfg,			sampler,		,		) \
		_decl( string,				uniform,		,		)
			
#	include "Base/MetaData/MetaDataObject.h"



	//
	// Program Vertex Attrib
	//
#	define META_OBJECT			ProgramAttribCfg
#	define META_OBJECT_NAME		TOSTRING( ProgramAttrib )
#	define META_NAME			MetaProgramAttrib
#	define META_BASECLASS		Program::Attrib

#	define META_FIELDS( _decl ) \
		_decl( string,				name,			name,			) \
		_decl( int,					index,			index,			-1 ) \
		_decl( int,					type,			type,			0 )
			
#	include "Base/MetaData/MetaDataObject.h"


	
	//
	// Program
	//
#	define META_OBJECT			ProgramCfg
#	define META_OBJECT_NAME		TOSTRING( Program )
#	define META_NAME			MetaProgram

#	define META_FIELDS( _decl ) \
		_decl( RenderStateCfg,				renderState,		,	) \
		_decl( string,						vertexShader,		,	) \
		_decl( string,						fragmentShader,		,	) \
		_decl( array<ProgramTextureCfg>,	textures,			,	) \
		_decl( array<ProgramAttribCfg>,		attribs,			,	) \
		_decl( string,						frag_ub_name,		,	)
			
#	include "Base/MetaData/MetaDataObject.h"

